package itdfq.dfq.Behavior_Patters.zhongjiezhe;

/**
 * @Author GocChin
 * @Date 2021/5/17 18:50
 * @Blog: itdfq.com
 * @QQ: 909256107
 * @Descript:
 */
public abstract class Student {
    protected  AbstractChatroom chatroom;
    protected String name;
    //判断会员
    protected Integer role;
    public Student(Integer role,String name) {
        this.role = role;
        this.name=name;
    }
    public abstract  void sendText(String to, String message);
    public abstract  void sendImage(String to,String message);
    public AbstractChatroom getChatroom() {
        return chatroom;
    }
    public void setChatroom(AbstractChatroom chatroom) {
        this.chatroom = chatroom;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public void receiveText(String from,String message){
        System.out.println(from+"发送文本给"+this.name+"  内容为："+message);
    }
    public void receiveImage(String from,String message){
        System.out.println(from+"发送图片给"+this.name+"  内容为："+message);
    }
}
